package com.secf.service.action.hpy.hys.day91;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * @Author bug菌
 * @Source 公众号：猿圈奇妙屋
 * @Date 2024年7月9日15:01:32
 */
public class TestGUI {

    public static void main(String[] args) {
        JFrame frame = new JFrame("Button Test");
        JButton button = new JButton("Click Me");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(frame, "Button Clicked!");
            }
        });
        frame.add(button);
        frame.pack();
        frame.setVisible(true);
    }

}
